package com.frame.work.mqtt.util;

import java.util.UUID;

public final class WSMQTTServerCommon {

    //发布broker的ip和端口
//	public static final String TCPAddress = System.getProperty("TCPAddress", "tcp://47.98.159.243:1883");
    public static final String TCPAddress = System.getProperty("TCPAddress", "tcp://192.168.2.88:1883");

    //客户端id
    public static String clientId = String.format("%-23.23s", System.getProperty("clientId", (UUID.randomUUID().toString())).trim().replace("-", "_"));

    //发布消息的主题
    public static final String topicString = System.getProperty("topicString", "mqtt-test");

    //发布的消息
    public static final String publication = System.getProperty("publication", "Hello Mosquitto" + String.format("%tc", System.currentTimeMillis()));

    //超时时间
    public static final int quiesceTimeout = Integer.parseInt(System.getProperty("timeout", "10000"));

    public static final int sleepTimeout = Integer.parseInt(System.getProperty("timeout", "10000"));

    public static boolean cleanSession = Boolean.parseBoolean(System.getProperty("cleanSession", "false"));

    public static final int Qos = Integer.parseInt(System.getProperty("Qos", "1"));

    public static final boolean retained = Boolean.parseBoolean(System.getProperty("retained", "false"));

}
